
#ifndef BZRUBY_H
#define BZRUBY_H

#include <iostream>
#include <vector>

//#include "ruby.h"
#include <ruby.h>
#include "bzfsAPI.h"

void InitPlugin(void);

void emit_ruby_event(char * eMsg, VALUE data);
void emit_ruby_event(char * eMsg);
void load_plug(void);

// ruby event classes
VALUE c_event_data_class(void);
VALUE c_ctf_capture_event_data_class(void);
VALUE c_player_die_event_data_class(void);
VALUE c_player_spawn_event_data_class(void);
VALUE c_chat_event_data_class(void);
VALUE c_player_join_part_event_data_class(void);
VALUE c_unknown_slash_command_event_data_class(void);
VALUE c_get_player_spawn_pos_event_data_class(void);
VALUE c_allow_player_event_data_class(void);
VALUE c_tick_event_data_class(void);
VALUE c_generate_world_event_data_class(void);
VALUE c_get_player_info_event_data_class(void);
VALUE c_get_auto_team_event_data_class(void);
VALUE c_allow_spawn_data_class(void);
VALUE c_list_server_update_event_class(void);
VALUE c_ban_event_data_class(void);
VALUE c_host_ban_event_data_class(void);
VALUE c_kick_event_data_class(void);
VALUE c_kill_event_data_class(void);
VALUE c_player_paused_event_data_class(void);
VALUE c_message_filtered_event_data_class(void);
VALUE c_game_start_end_event_data_class(void);
VALUE c_slash_command_event_data_class(void);
VALUE c_player_auth_event_data_class(void);
VALUE c_server_msg_event_data_class(void);
VALUE c_shot_fired_event_data_class(void);
VALUE c_player_update_event_data_class(void);
VALUE c_net_transfer_event_data_class(void);
VALUE c_loging_event_data_class(void);
VALUE c_shot_ended_event_data_class(void);
VALUE c_flag_transferred_event_data_class(void);
VALUE c_flag_grabbed_event_data_class(void);
VALUE c_flag_dropped_event_data_class(void);

VALUE c_player_record_class(void);

void playerRecord_free(bz_PlayerRecord * playerRecord);


bool load_ruby_plugin(const char * plugin, const char * param);

// ruby wrapper methods

VALUE wrap_rb_require(VALUE arg);

VALUE wrap_ruby_event(VALUE args);
VALUE protected_ruby_event(VALUE event, VALUE method, VALUE data);


#endif
